package de.fhkl.gatav.ut.camera4atouchthreadcamview;

import de.fhkl.gatav.ut.camera4atouchthreadcamview.R;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;

public class CameraTouchThreadCamViewActivity extends Activity {
	
	public CamSurfaceHolder	camSurface;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.main);       
        camSurface = (CamSurfaceHolder) findViewById(R.id.camSurface);
    }
    
    @Override
	protected void onPause() {
	    Log.d("CameraTouchThreadCamViewActivity","onPause");
    	if (camSurface!=null) {
    		camSurface.releaseCam();
    	}
		super.onPause();
	}

	@Override
	protected void onResume() {
		super.onResume();
	    Log.d("CameraTouchThreadCamViewActivity","onResume");
		if (camSurface!=null) {
			camSurface.reOpenCam();
		}
	}
}